﻿/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace DokuzEylul.Sinav.Entities
{
	/// <summary>
	/// SinavMenu object for NHibernate mapped table 'SinavMenu'.
	/// </summary>
	[Serializable]
    public class SinavMenu : Unipa.Framework.Data.BaseDbEntity
	{
		#region Member Variables
		protected int m_menuid;
		protected string m_menutitle;
		protected int? m_menuparentid;
		protected int? m_menutype;
		protected string m_menuurl;
		#endregion
		#region Constructors
			
		public SinavMenu() {}
					
		public SinavMenu(int menuid, string menutitle, int? menuparentid, int? menutype, string menuurl) 
		{
			this.m_menuid= menuid;
			this.m_menutitle= menutitle;
			this.m_menuparentid= menuparentid;
			this.m_menutype= menutype;
			this.m_menuurl= menuurl;
		}

		public SinavMenu(int menuid)
		{
			this.m_menuid= menuid;
		}
		
		#endregion
		#region Public Properties
		public  virtual int MenuId
		{
			get { return m_menuid; }
			set {m_menuid= value; }
		}
		public  virtual string MenuTitle
		{
			get { return m_menutitle; }
			set {m_menutitle= value; }
		}
		public  virtual int? MenuParentId
		{
			get { return m_menuparentid; }
			set {m_menuparentid= value; }
		}
		public  virtual int? MenuType
		{
			get { return m_menutype; }
			set {m_menutype= value; }
		}
		public  virtual string MenuUrl
		{
			get { return m_menuurl; }
			set {m_menuurl= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			SinavMenu castObj = (SinavMenu)obj;
			return ( castObj != null ) &&
			this.m_menuid == castObj.MenuId;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * m_menuid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
